package org.aiesec.fortaleza.xmatch.model.repository;

import java.io.Serializable;
import java.util.List;

import org.aiesec.fortaleza.xmatch.model.entity.EntityBase;
import org.aiesec.fortaleza.xmatch.model.util.Criteria;

public interface Repository<Entity extends EntityBase> {

	public Entity save(Entity entity);

	public void remove(Entity entity);

	public Entity findBy(Serializable id);

	public List<Entity> findAll();

	public List<Entity> readByCriteria(Criteria criteria, int initialPos,
			int finalPos);

	public List<Entity> readByCriteria(Criteria criteria);

	public Long totalOfByCriteria(Criteria criteria);
}
